load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "db.go",
        "db_fake.go",
        "db_status_store.go",
        "default_experiment_store.go",
        "experiment_store.go",
        "job_store.go",
        "minio_client.go",
        "minio_client_fake.go",
        "object_store.go",
        "object_store_fake.go",
        "pipeline_store.go",
        "resource_reference_store.go",
        "run_store.go",
        "sql_null_util.go",
    ],
    importpath = "github.com/kubeflow/pipelines/backend/src/apiserver/storage",
    visibility = ["//visibility:public"],
    deps = [
        "//backend/api:go_default_library",
        "//backend/src/apiserver/common:go_default_library",
        "//backend/src/apiserver/list:go_default_library",
        "//backend/src/apiserver/model:go_default_library",
        "//backend/src/common/util:go_default_library",
        "@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
        "@com_github_ghodss_yaml//:go_default_library",
        "@com_github_go_sql_driver_mysql//:go_default_library",
        "@com_github_golang_glog//:go_default_library",
        "@com_github_jinzhu_gorm//:go_default_library",
        "@com_github_masterminds_squirrel//:go_default_library",
        "@com_github_mattn_go_sqlite3//:go_default_library",
        "@com_github_minio_minio_go//:go_default_library",
        "@com_github_pkg_errors//:go_default_library",
        "@com_github_vividcortex_mysqlerr//:go_default_library",
        "@io_k8s_apimachinery//pkg/util/json:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "db_status_store_test.go",
        "db_test.go",
        "default_experiment_store_test.go",
        "experiment_store_test.go",
        "job_store_test.go",
        "object_store_test.go",
        "pipeline_store_test.go",
        "resource_reference_store_test.go",
        "run_store_test.go",
    ],
    embed = [":go_default_library"],
    deps = [
        "//backend/api:go_default_library",
        "//backend/src/apiserver/common:go_default_library",
        "//backend/src/apiserver/list:go_default_library",
        "//backend/src/apiserver/model:go_default_library",
        "//backend/src/common/util:go_default_library",
        "//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
        "@com_github_masterminds_squirrel//:go_default_library",
        "@com_github_minio_minio_go//:go_default_library",
        "@com_github_pkg_errors//:go_default_library",
        "@com_github_stretchr_testify//assert:go_default_library",
        "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
        "@io_k8s_apimachinery//pkg/util/json:go_default_library",
        "@io_k8s_kubernetes//pkg/apis/core:go_default_library",
        "@org_golang_google_grpc//codes:go_default_library",
    ],
)
